﻿namespace MSSqlSchemaDoc.Core
{
    using System;
using System.Runtime.Serialization;

    /// <summary>
    /// If a collection contains pairs of values the number of elements in the collection
    /// should be an even number.
    /// </summary>
    [Serializable()]
    public class UnevenElementCountException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the UnevenElementCountException class.
        /// </summary>
        public UnevenElementCountException()
            : base()
        {
        }

        /// <summary>
        /// Initializes a new instance of the UnevenElementCountException class.
        /// </summary>
        /// <param name="message">A custom error string.</param>
        public UnevenElementCountException(string message)
            : base(message)
        {
        }

        /// <summary>
        /// Initializes a new instance of the UnevenElementCountException class.
        /// </summary>
        /// <param name="message">A custom error string.</param>
        /// <param name="e">The inner exception.</param>
        public UnevenElementCountException(string message, Exception e)
            : base(message, e)
        {
        }

        /// <summary>
        /// Initializes a new instance of the UnevenElementCountException class.
        /// </summary>
        /// <param name="info">Serialization information.</param>
        /// <param name="context">Streaming context.</param>
        protected UnevenElementCountException(SerializationInfo info, StreamingContext context)
            : base(info, context)
        {
        }
    }
}
